/**
 * 
 */
package com.sc.softmgr.business.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.acc.softmgr.model.SoftmgrSubSystem;
import com.alibaba.fastjson.JSONObject;
import com.sc.softmgr.business.service.fallback.SoftmgrSubSystemFallback;
import com.sc.softmgr.common.web.DataGridObject;

/**
 * 
 * @content
 * 
 * @date 2017年6月13日
 * 
 * @author OprCalf
 * 
 */
@FeignClient(value = "SOFTMGR-SUBSYSTEM1", fallback = SoftmgrSubSystemFallback.class)
public interface ISoftmgrSubSystemFeignService {

	@RequestMapping(value = "softSubSystem/searchSoftSubSystem", method = RequestMethod.GET)
	public DataGridObject<SoftmgrSubSystem> searchSoftSubSystem(@RequestParam("searchProjectId") String searchProjectId,
			@RequestParam("searchSystemId") String searchSystemId,
			@RequestParam("searchSubSystemName") String searchSubSystemName, @RequestParam("page") Integer page,
			@RequestParam("rows") Integer rows);

	@RequestMapping(value = "softSubSystem/addSoftSubSystem", method = RequestMethod.POST)
	public JSONObject addSoftSubSystem(@RequestParam("projectId") String projectId,
			@RequestParam("systemId") String systemId, @RequestParam("subSystemName") String subSystemName,
			@RequestParam("currentUserName") String currentUserName);

	/**
	 * 修改子系统
	 * 
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "softSubSystem/editSoftSubSystem", method = RequestMethod.POST)
	public JSONObject editSoftSubSystem(@RequestParam("id") Integer id, @RequestParam("systemId") String systemId,
			@RequestParam("subSystemName") String subSystemName,
			@RequestParam("currentUserName") String currentUserName);
	
	/**
	 * 查询详情
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "softSubSystem/{id}/searchSoftSubSystem", method = RequestMethod.GET)
	public JSONObject searchSoftSubSystem(@PathVariable("id") Integer id);
	

	/**
	 * 删除子系统
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "softSubSystem/removeSoftSubSystem", method = RequestMethod.POST)
	public JSONObject removeSoftSubSystem(@RequestParam("id") Integer id);
	
	/**
	 * 获取所有子系统
	 * 
	 * @return
	 */
	@RequestMapping(value = "softSubSystem/getSoftSubSystem", method = RequestMethod.GET)
	public String getSoftSubSystem();
}
